/**
 * 
 */
package com.pengtu.gsj.entity.jsbz;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;


import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

import java.util.List;

/**
 * 技术保障 信息化管理 系统记录
 * InfoManagement
 * 
 * 2017年6月9日 下午17:37:53
 * @author heyong
 *
 */

@Entity
@Table(name = "T_JS_INFOMANAGEMENT")
public class InfoManagement extends IdEntity{
	
	private static final long serialVersionUID = 1L;
	
	private String systemName;  		//系统名称
	private String systemCode;			//系统编码
	private String systemType;			//系统类型
	private String systemDate;			//系统建立时间
	private String systemIsRun;			//系统是否正常运行
	private String remark;				//备注
	private String isHaveSystem;		//是否包含的系统
	private String haveSystem;			//包含的系统
	private String isShare;				//是否共享数据
	
	private Integer bulletinNumber;   //检测文件数
	private List<Attachment> attachments;
	
	
	public InfoManagement() {
	}

	@Column(name = "SYSTEMNAME")
	public String getSystemName() {
		return systemName;
	}
	
	public void setSystemName(String systemName) {
		this.systemName = systemName;
	}
	
	@Column(name = "SYSTEMCODE")
	public String getSystemCode() {
		return systemCode;
	}
	public void setSystemCode(String systemCode) {
		this.systemCode = systemCode;
	}
	@Column(name = "SYSTEMTYPE")
	public String getSystemType() {
		return systemType;
	}
	public void setSystemType(String systemType) {
		this.systemType = systemType;
	}
	@Column(name = "SYSTEMDATE")
	public String getSystemDate() {
		return systemDate;
	}
	public void setSystemDate(String systemDate) {
		this.systemDate = systemDate;
	}
	@Column(name = "SYSTEMISRUN")
	public String getSystemIsRun() {
		return systemIsRun;
	}
	public void setSystemIsRun(String systemIsRun) {
		this.systemIsRun = systemIsRun;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	@Column(name = "ISHAVESYSTEM")
	public String getIsHaveSystem() {
		return isHaveSystem;
	}
	public void setIsHaveSystem(String isHaveSystem) {
		this.isHaveSystem = isHaveSystem;
	}
	
	@Column(name = "HAVESYSTEM")
	public String getHaveSystem() {
		return haveSystem;
	}
	public void setHaveSystem(String haveSystem) {
		this.haveSystem = haveSystem;
	}
	
	@Column(name = "ISSHARE")
	public String getIsShare() {
		return isShare;
	}
	public void setIsShare(String isShare) {
		this.isShare = isShare;
	}
	
	
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
	
}
